<template>
  <div>
  </div>
</template>

<script>
export default {
  name: "Student",

  data() {
    return {
      name: "张三",
    };
  },
  methods:{
    getSchool(val){
      console.log("School组件的name属性为："+val);
    }
  },
  mounted() {
    this.$bus.$on("getSchool",this.getSchool)
  },
  beforeDestroy(){
    this.$bus.$off("getSchool");
  }
};
</script>
